FNR==1{fname[ARGIND]=FILENAME}
ARGIND==1{# reading parameters from copa file
  if(FNR==3){tnodes=$1};
  if(FNR==tnodes+4){np=$1};
  if(FNR>tnodes+4&&FNR<=tnodes+4+np){
    pr[$1]=$0;
  }
}
ARGIND==2{# reading parameter file
  if(FNR==1&&$1!=np){
    emsg="Parameters in "fname[1]" and "fname[2]" are not compatible.";
  }
  if(FNR>1&&FNR<=np+1){out=out""pr[FNR-1]"\n"}else if(FNR>1){out=out""$0"\n"};
}
END{
  if(!emsg){
    print np," # positional parameters by para2para from "fname[1];
    printf out;
  }else{
    print emsg > "/dev/stderr";
  };
}
